import Http from "../http";

export function chargeStrategyPaginationApi(params:any) {
    return Http.get('chargeStrategy/list', params)
}

export async function addChargeStrategyApi(data:any) {
    return await Http.post('chargeStrategy/add', data)
}

export async function editChargeStrategyApi(strategyId:number, data:any) {
    return await Http.put('chargeStrategy/edit/' + strategyId, data)
}

export async function getChargeStrategyEditDataApi(deviceId:number) {
    const { data } = await Http.get('chargeStrategy/edit/' + deviceId)
    return data
}

export async function queryStrategyNameApi(name:string) {
    return Http.get('chargeStrategy/list/' + name)
}